var btn = document.getElementById('leadWine');
btn.onclick = function() {
    // mui.alert('领取成功', '提示', function() {
    //     console.log(111);
    // });
    var num = document.getElementById('num').value;
    var type = document.getElementById('type').value;
    var uid = document.getElementById('uid').value;
        mui.ajax('/admin/receiveWine',{
        data:{
            uid: uid,
            type: type,
            num:num
        },
        type:'post',//HTTP请求类型
        success:function(data){
           if(data.code>=0){
               mui.alert('领取成功', '提示', function() {
                   location.href="/admin/leadWine";
               });
           }else{
               mui.alert(data.msg, '提示', function() {
                   location.href="/admin/leadWine";
               });
           }
        },
        error:function(data){
            console.log('data',data);
        }
    });
}